<ng-container *ngIf="codes.length > 1; else singleCodeBlock">
  <pre id="bigCodeBlock">
    <span *ngFor="let code of codes"
          class="d-flex p-2 align-items-center justify-content-between text-dark">
      <span>{{code}}</span>
      <cd-copy-2-clipboard-button
          [source]="code"
          [byId]="false"></cd-copy-2-clipboard-button>
    </span>
  </pre>
</ng-container>

<ng-template #singleCodeBlock>
  <pre class="d-flex p-2 align-items-center justify-content-between text-dark"
       id="singleCodeBlock">
    <span>{{codes}}</span>
    <cd-copy-2-clipboard-button
      [source]="codes"
      [byId]="false"></cd-copy-2-clipboard-button>
  </pre>
</ng-template>
